package kr.hkit.info.powerjava.ch14.lab.StudentScore;

import java.util.Map;

public class Stduent {
	private int num;
	private String name;
	private int kor;
	private int eng;
	private int math;
	
	public Stduent() {}
	public Stduent(int num, String name) {
		this.num = num;
		this.name = name;
	}
	public Stduent(int num, String name, int kor, int eng, int math) {
		this.num = num;
		this.name = name;
		this.kor = kor;
		this.eng = eng;
		this.math = math;
	}
	
	@Override
	public String toString() {
		return String.format("[%s, %s, %s, %s, %s]", num,name, kor, eng, math);
	}		

	public int getNum() {
		return num;
	}
	public void setNum(int num) {
		this.num = num;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getKor() {
		return kor;
	}
	public void setKor(int kor) {
		this.kor = kor;
	}
	public int getEng() {
		return eng;
	}
	public void setEng(int eng) {
		this.eng = eng;
	}
	public int getMath() {
		return math;
	}
	public void setMath(int math) {
		this.math = math;
	}
	
	public Map<String,Stduent>  Remove(Map<String,Stduent> st,String name){
		st.remove(name);
		return st;
	}
	
	public void Save(Map<String,Stduent> st,Stduent s){
		st.put(s.name, new Stduent( s.num,s.name,s.kor,s.eng,s.math));
	}
}
